
package com.idealighter.game.dictionary.domain;

import java.lang.reflect.Field;

import org.slf4j.LoggerFactory;

public class HappyFiveRobotRulesDomain {

  // 策略ID
  private int id;
  // 发牌轮数
  private int cardsNum;
  // 下注次数
  private int times;
  // 是否先说话（牌面最大）
  private int first;
  // 是否有最大牌值的牌
  private int biggest;
  // 自己是否有对子（0否1是）
  private int pairedMy;
  // 对子是否是最大牌值（0否1是）
  private int pairedMax;
  // 对子是否是最小牌值（0否1是）
  private int pairedMin;
  // 其他人明牌中是否有对子（0否1是）
  private int pairedOthers;
  // 是否有两对
  private int twoTwo;
  // 其他人是否有两对
  private int twoTwoOthers;
  // 是否有三条
  private int three;
  // 其他人是否有三条
  private int threeOthers;
  // 是否有4张牌顺子（0否1是）
  private int longFour;
  // 别人是否为4张以上顺子
  private int longFourOthers;
  // 是否为4张以上同花
  private int sameFour;
  // 别人是否为4张以上同花
  private int sameFourOthers;
  // 手牌+明牌是否输对方明牌
  private int win1;
  // 是否有人梭哈
  private int showHandOthers;
  // 最终是否获胜
  private int win2;
  // 跟
  private int follow;
  // 加注1
  private int filling1;
  // 加注2
  private int filling2;
  // 加注3
  private int filling3;
  // 梭哈
  private int showhand;
  // 放弃
  private int giveUp;
  // 操作最小时间
  private int timeMin;
  // 操作最大时间
  private int timeMax;
  // 备注
  private String remark;

  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof HappyFiveRobotRulesDomain)) {
      return false;
    }
    HappyFiveRobotRulesDomain other = (HappyFiveRobotRulesDomain) obj;

    return (cardsNum == other.cardsNum) && (times == other.times) && (first == other.first)
        && (biggest == other.biggest) && (pairedMy == other.pairedMy)
        && (pairedMax == other.pairedMax) && (pairedMin == other.pairedMin)
        && (pairedOthers == other.pairedOthers) && (twoTwo == other.twoTwo)
        && (twoTwoOthers == other.twoTwoOthers) && (three == other.three)
        && (threeOthers == other.threeOthers) && (longFour == other.longFour)
        && (longFourOthers == other.longFourOthers) && (sameFour == other.sameFour)
        && (sameFourOthers == other.sameFourOthers) && (win1 == other.win1)
        && (showHandOthers == other.showHandOthers) && (win2 == other.win2);
  }

  @Override
  public String toString() {
    Class<?> c = null;
    try {
      c = Class.forName("com.idealighter.game.dictionary.domain.HappyFiveRobotRulesDomain");
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
    Field[] fields = c.getDeclaredFields();

    for (Field f : fields) {
      f.setAccessible(true);
    }
    String msg = "";
    for (Field f : fields) {
      // String field = f.toString().substring(f.toString().lastIndexOf(".") + 1);
      // 取出属性名称
      try {
        // System.err.print(field + " --> " + f.get(this) + " ");
        msg += "," + f.get(this) + " ";
        // return f.get(this).toString();
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      }
    }
    LoggerFactory.getLogger("HappyFiveRuleLog").info(msg);
    return "";
    // return JSON.toJSONString(this);

    // return JSON.toJSONString(this);
  }


  public int getId() {
    return id;
  }

  public void setId(int id) {
    this.id = id;
  }

  public int getFirst() {
    return first;
  }

  public void setFirst(int first) {
    this.first = first;
  }

  public int getCardsNum() {
    return cardsNum;
  }

  public void setCardsNum(int cardsNum) {
    this.cardsNum = cardsNum;
  }

  public int getTimes() {
    return times;
  }

  public void setTimes(int times) {
    this.times = times;
  }



  public int getBiggest() {
    return biggest;
  }

  public void setBiggest(int biggest) {
    this.biggest = biggest;
  }

  public int getPairedMy() {
    return pairedMy;
  }

  public void setPairedMy(int pairedMy) {
    this.pairedMy = pairedMy;
  }

  public int getPairedMax() {
    return pairedMax;
  }

  public void setPairedMax(int pairedMax) {
    this.pairedMax = pairedMax;
  }

  public int getPairedMin() {
    return pairedMin;
  }

  public void setPairedMin(int pairedMin) {
    this.pairedMin = pairedMin;
  }

  public int getPairedOthers() {
    return pairedOthers;
  }

  public void setPairedOthers(int pairedOthers) {
    this.pairedOthers = pairedOthers;
  }

  public int getTwoTwo() {
    return twoTwo;
  }

  public void setTwoTwo(int twoTwo) {
    this.twoTwo = twoTwo;
  }

  public int getTwoTwoOthers() {
    return twoTwoOthers;
  }

  public void setTwoTwoOthers(int twoTwoOthers) {
    this.twoTwoOthers = twoTwoOthers;
  }

  public int getThree() {
    return three;
  }

  public void setThree(int three) {
    this.three = three;
  }

  public int getThreeOthers() {
    return threeOthers;
  }

  public void setThreeOthers(int threeOthers) {
    this.threeOthers = threeOthers;
  }

  public int getLongFour() {
    return longFour;
  }

  public void setLongFour(int longFour) {
    this.longFour = longFour;
  }

  public int getLongFourOthers() {
    return longFourOthers;
  }

  public void setLongFourOthers(int longFourOthers) {
    this.longFourOthers = longFourOthers;
  }

  public int getSameFour() {
    return sameFour;
  }

  public void setSameFour(int sameFour) {
    this.sameFour = sameFour;
  }

  public int getSameFourOthers() {
    return sameFourOthers;
  }

  public void setSameFourOthers(int sameFourOthers) {
    this.sameFourOthers = sameFourOthers;
  }

  public int getWin1() {
    return win1;
  }

  public void setWin1(int win1) {
    this.win1 = win1;
  }

  public int getShowHandOthers() {
    return showHandOthers;
  }

  public void setShowHandOthers(int showHandOthers) {
    this.showHandOthers = showHandOthers;
  }

  public int getWin2() {
    return win2;
  }

  public void setWin2(int win2) {
    this.win2 = win2;
  }

  public int getFollow() {
    return follow;
  }

  public void setFollow(int follow) {
    this.follow = follow;
  }

  public int getFilling1() {
    return filling1;
  }

  public void setFilling1(int filling1) {
    this.filling1 = filling1;
  }

  public int getFilling2() {
    return filling2;
  }

  public void setFilling2(int filling2) {
    this.filling2 = filling2;
  }

  public int getFilling3() {
    return filling3;
  }

  public void setFilling3(int filling3) {
    this.filling3 = filling3;
  }

  public int getShowhand() {
    return showhand;
  }

  public void setShowhand(int showhand) {
    this.showhand = showhand;
  }

  public int getGiveUp() {
    return giveUp;
  }

  public void setGiveUp(int giveUp) {
    this.giveUp = giveUp;
  }

  public int getTimeMin() {
    return timeMin;
  }

  public void setTimeMin(int timeMin) {
    this.timeMin = timeMin;
  }

  public int getTimeMax() {
    return timeMax;
  }

  public void setTimeMax(int timeMax) {
    this.timeMax = timeMax;
  }

  public String getRemark() {
    return remark;
  }

  public void setRemark(String remark) {
    this.remark = remark;
  }

}
